<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.4">Jekyll</generator><link href="http://egonw.github.io/blog/feed/by_tag/rse.xml" rel="self" type="application/atom+xml" /><link href="http://egonw.github.io/blog/" rel="alternate" type="text/html" /><updated>2026-04-23T19:38:27+00:00</updated><id>http://egonw.github.io/blog/feed/by_tag/rse.xml</id><title type="html">chem-bla-ics</title><subtitle>Chemblaics (pronounced chem-bla-ics) is the science that uses open science and computers to solve problems in chemistry, biochemistry and related fields.</subtitle><author><name>Egon Willighagen</name></author><entry><title type="html">Things to check before you consider submitting a (final) CDK patch #1</title><link href="http://egonw.github.io/blog/2009/07/31/things-to-check-before-you-consider.html" rel="alternate" type="text/html" title="Things to check before you consider submitting a (final) CDK patch #1" /><published>2009-07-31T00:10:00+00:00</published><updated>2009-07-31T00:10:00+00:00</updated><id>http://egonw.github.io/blog/2009/07/31/things-to-check-before-you-consider</id><content type="html" xml:base="http://egonw.github.io/blog/2009/07/31/things-to-check-before-you-consider.html"><![CDATA[<p>Mark the <em>final</em> in the above title; if you merely seek advice on your patch, feel free to send them in whatever state. However, if you bring up your patch for peer review, make sure to have gone through the following steps, in random order:</p>

<ul>
  <li>be prepared for peer review feedback</li>
  <li>realize your code will have to be <a href="http://www.gnu.org/copyleft/lesser.html">LGPL</a> or LGPL-compatible</li>
  <li>make sure the copyright lines are properly updated (see <a href="http://chem-bla-ics.blogspot.com/2009/06/making-patches-attribution-copyright.html">Making patches; Attribution; Copyright and License.</a>)</li>
  <li>your code is fully unit tested</li>
  <li>your code does not cause <a href="http://pmd.sourceforge.net/">PMD</a> failures</li>
  <li>your code is fully JavaDoc-umented
    <ul>
      <li>no empty templates</li>
      <li>JavaDoc for every class field, method and class</li>
      <li>use of {@link}</li>
      <li>use of CDK tags @cdk.bug, @cdk.cite, etc</li>
      <li>period at the end of the first sentence</li>
      <li>…</li>
    </ul>
  </li>
  <li>make sure all the code still compiles</li>
  <li>make your code readable
    <ul>
      <li>80 characters per line</li>
      <li>variable names that reflect their purpose and nature</li>
      <li>no code complexity errors with PMD</li>
      <li>camelCasing as custom in Java</li>
      <li>comment your code where appropriate, explaining what your code is supposed to do</li>
      <li>…</li>
    </ul>
  </li>
</ul>

<p>These are reasons to reject your patch, so better make sure to not have to be reminded of that. The build environment comes with some code to make these
checks easier (though not the fixing). For example, say I introduced a new module <code class="language-plaintext highlighter-rouge">uff</code> (for the UFF force field):</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">cd </span>cdk/
<span class="nv">$ </span>ant clean dist-all test-dist-all
<span class="nv">$ </span>ant <span class="nt">-Dmodule</span><span class="o">=</span>uff test-module
<span class="nv">$ </span>ant <span class="nt">-f</span> javadoc.xml <span class="nt">-Dmodule</span><span class="o">=</span>uff doccheck-module
<span class="nv">$ </span>ant <span class="nt">-f</span> pmd.xml <span class="nt">-Dpmd</span>.test<span class="o">=</span>custom <span class="nt">-Dmodule</span><span class="o">=</span>uff test-module
<span class="nv">$ </span>ant <span class="nt">-f</span> pmd.xml <span class="nt">-Dpmd</span>.test<span class="o">=</span>custom <span class="nt">-Dmodule</span><span class="o">=</span>test-uff test-module
</code></pre></div></div>]]></content><author><name>Egon Willighagen</name></author><category term="cdk" /><category term="rse" /><summary type="html"><![CDATA[Mark the final in the above title; if you merely seek advice on your patch, feel free to send them in whatever state. However, if you bring up your patch for peer review, make sure to have gone through the following steps, in random order:]]></summary></entry></feed>